package com.acme.bankapp.domain.bank;

/**
 * This is saving variant of particular implementation of abstract account
 * 
 * @author Anton Kotov
 * 
 */
public class SavingAccount extends AbstractAccount {

	public SavingAccount(final int id, final double amount) {
		super(id, amount);
	}

	public void withdraw(final double amount) {
		if (getBalance() >= amount) {
			balance -= amount;
		}
	}

	@Override
	public double maximumAmountToWithdraw() {
		return getBalance();
	}
}
